'--------------------------------------------------------------------------------------
'Copyright: (c) 2010 Bentley Systems, Incorporated.
'--------------------------------------------------------------------------------------
'
'  This file is part of structural-gc.
'
'  structural-gc is free software: you can redistribute it and/or modify
'  it under the terms of the GNU General Public License as published by
'  the Free Software Foundation, either version 2 of the License, or
'  (at your option) any later version.
'
'  structural-gc is distributed in the hope that it will be useful,
'  but WITHOUT ANY WARRANTY; without even the implied warranty of
'  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'  GNU General Public License for more details.
'
'  You should have received a copy of the GNU General Public License
'  along with structural-gc.  If not, see <http://www.gnu.org/licenses/>
'--------------------------------------------------------------------------------------

Imports Bentley.GenerativeComponents.Features

Namespace Forms

    Public Class PlacementPointForm
        Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

        Public Sub New()
            MyBase.New()

            'This call is required by the Windows Form Designer.
            InitializeComponent()

            'Add any initialization after the InitializeComponent() call

        End Sub

        'Form overrides dispose to clean up the component list.
        Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
            If disposing Then
                If Not (components Is Nothing) Then
                    components.Dispose()
                End If
            End If
            MyBase.Dispose(disposing)
        End Sub

        'Required by the Windows Form Designer
        Private components As System.ComponentModel.IContainer

        'NOTE: The following procedure is required by the Windows Form Designer
        'It can be modified using the Windows Form Designer.
        'Do not modify it using the code editor.
        Friend WithEvents m_okButton As System.Windows.Forms.Button
        Friend WithEvents m_cancelButton As System.Windows.Forms.Button
        Friend WithEvents m_placementPointComboBox As System.Windows.Forms.ComboBox
        <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
            Me.m_okButton = New System.Windows.Forms.Button
            Me.m_cancelButton = New System.Windows.Forms.Button
            Me.m_placementPointComboBox = New System.Windows.Forms.ComboBox
            Me.SuspendLayout()
            '
            'm_okButton
            '
            Me.m_okButton.DialogResult = System.Windows.Forms.DialogResult.OK
            Me.m_okButton.Location = New System.Drawing.Point(110, 64)
            Me.m_okButton.Name = "m_okButton"
            Me.m_okButton.Size = New System.Drawing.Size(96, 41)
            Me.m_okButton.TabIndex = 0
            Me.m_okButton.Text = "OK"
            '
            'm_cancelButton
            '
            Me.m_cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel
            Me.m_cancelButton.Location = New System.Drawing.Point(257, 64)
            Me.m_cancelButton.Name = "m_cancelButton"
            Me.m_cancelButton.Size = New System.Drawing.Size(96, 40)
            Me.m_cancelButton.TabIndex = 0
            Me.m_cancelButton.Text = "Cancel"
            '
            'm_placementPointComboBox
            '
            Me.m_placementPointComboBox.Location = New System.Drawing.Point(144, 16)
            Me.m_placementPointComboBox.Name = "m_placementPointComboBox"
            Me.m_placementPointComboBox.Size = New System.Drawing.Size(312, 28)
            Me.m_placementPointComboBox.TabIndex = 1
            '
            'PlacementPointForm
            '
            Me.AcceptButton = Me.m_okButton
            Me.AutoScaleBaseSize = New System.Drawing.Size(8, 19)
            Me.CancelButton = Me.m_cancelButton
            Me.ClientSize = New System.Drawing.Size(464, 117)
            Me.Controls.Add(Me.m_placementPointComboBox)
            Me.Controls.Add(Me.m_okButton)
            Me.Controls.Add(Me.m_cancelButton)
            Me.MaximizeBox = False
            Me.MinimizeBox = False
            Me.Name = "PlacementPointForm"
            Me.ShowInTaskbar = False
            Me.Text = "Placement Point Expression Builder"
            Me.ResumeLayout(False)

        End Sub

#End Region

        Friend Property ExpressionText() As String
            Get
                Return "PlacementPoint." & m_placementPointComboBox.Text
            End Get
            Set(ByVal Value As String)
                Value = Value.Replace("""", "")
                Dim pos As Integer = Value.IndexOf(":")
                If pos < 0 Then pos = Value.Length
            End Set
        End Property

        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            '        Dim names As String() = System.Enum.GetNames(GetType(PlacementPoint))

        End Sub

    End Class

End Namespace